<template>
  <el-icon :size="size" :color="color">
    <SvgIcon v-if="name.includes('comp-')" :name="name" />
    <component v-else :is="name" />
  </el-icon>
</template>

<script setup lang="ts">
import SvgIcon from '../svg-icon/index.vue'

defineProps({
  name: {
    type: String,
    required: true,
  },
  size: {
    type: [Number, String],
    default: 16,
  },
  color: {
    type: String,
    default: '',
  },
})

</script>
<style scoped lang="scss">
</style>